package thu.cs.segroup.agent.behaviour;

import java.util.ArrayList;

import thu.cs.segroup.entity.TestTask;
import thu.cs.segroup.util.Constants;
import jade.core.Agent;
import jade.core.behaviours.OneShotBehaviour;
import jade.lang.acl.ACLMessage;

public class CoorAssignTaskToSpecificRunnerBehav extends OneShotBehaviour {

	private String runner;
	private TestTask task;
	
	public CoorAssignTaskToSpecificRunnerBehav(String runner, TestTask task, Agent agent) {
		super(agent);
		this.runner = runner;
		this.task = task;
	}
	
	@Override
	public void action() {
		ArrayList<String> des = new ArrayList<String>();
		des.add(this.runner);
		myAgent.addBehaviour(new CommonSendObjMsgBehav(this.task, des, Constants.TASK_ARRIVE, ACLMessage.INFORM,
				myAgent));
	}

}
